/*
 * Copyright 2003-2007 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

package com.colony.mime;

import java.util.HashMap;
import java.util.Iterator;

/**
 *  A MimeInputStream extends InputStream to add mime content type and encoding method.
 */
public abstract class MimeInputStream
extends java.io.InputStream
{
   private HashMap _headers;

   public MimeInputStream( )
   {
      _headers = new HashMap();
   }

   public MimeInputStream( HashMap headers )
   {
      _headers = headers;
   }

   public void setHeader( String name, String value )
   {
      _headers.put( name, value );
   }

   public String getHeader( String name )
   {
      return (String) _headers.get( name );
   }

   public Iterator headers()
   {
      return _headers.keySet().iterator();
   }

	protected HashMap hashTable()
	{
		return _headers;
	}
}